<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<title></title>
	<meta name="generator" content="LibreOffice 6.3.3.2.0 (Linux)"/>
	<meta name="author" content="Georg Potthast"/>
	<meta name="created" content="2020-06-04T00:00:00.019382087"/>
	<meta name="changed" content="2020-06-06T07:41:40.434116043"/>
	<style type="text/css">
		@page { size: 21cm 29.7cm; margin: 2cm }
		p { margin-bottom: 0.21cm; background: transparent; line-height: 115%; background: transparent }
		td p { background: transparent; background: transparent }
		a:link { color: #000080; so-language: zxx; text-decoration: underline }
		a:visited { color: #800000; so-language: zxx; text-decoration: underline }
	</style>
</head>
<body lang="de-DE" link="#000080" vlink="#800000" dir="ltr"><p style="margin-bottom: 0cm">
<br/>

</p>
<p style="margin-bottom: 0cm"><font face="Arial, sans-serif"><font size="5" style="font-size: 18pt"><b>Keymaps
for the keyboard driver</b></font></font></p>
<p style="margin-bottom: 0cm"><br/>

</p>
<table width="639" cellpadding="4" cellspacing="0">
	<col width="631"/>

	<tr>
		<td width="631" valign="top" style="border: none; padding: 0cm"><p><font color="#000000"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">The
			IBM PC keyboard does not generate ASCII codes directly. The keys
			are each identified with a number, starting with the keys that are
			located in the upper left of the original PC keyboard. 1 for the
			&quot;ESC'' key, 2 for the &quot;1'', and so on. Each key is
			assigned a number, including modifier keys like the left SHIFT and
			right SHIFT keys, numbers 42 and 54. When a key is pressed, ELKS
			receives the key number as a scan code. A scan code is also
			generated when a key is released, but the code generated upon
			release has the most significant bit set (equivalent to adding 128
			to the key number). Thus a key press and a key release can be
			distinguished. By keeping track of which modifier keys have been
			pressed and not yet released, a large number of combinations are
			possible.<br/>
<br/>
Because the keyboard delivers scan codes
			rather than the character codes used by application software, the
			keyboard driver must convert between the scan codes and the ASCII
			codes by using a table. To support international keyboards the
			driver must map the different keyboards with different tables.
			<br/>
<br/>
</font></font></font><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">For
			the ELKS operating system, these tables are in the
			elks/arch/i86/drivers/char/KeyMaps directory. The keyboard driver,
			xt_key.c, includes the KeyMaps/</font></font><font color="#000000"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Keymaps.h
			file which is automatically created. This includes alle the keymap
			files in the KeyMaps directory for the different keyboard layouts
			needed for different languages. The xt_key.c keyboard driver has
			been extended to support AT keyboards as well.<br/>
<br/>
The
			keycode tables in the keymap header files are arranged with
			ascending scancode values. These are specified in hex codes after
			each line. There are four tables in each header file, one for
			normal keys, one for shifted keys, one for keys being pressed in
			combination with the ALT+CTRL keys and one in combination with the
			caps lock key. The ASCII value can be entered in the table as a
			character or as an octal code. For the extended or grey keys,
			these have to have an octal value of 200 or higher. This are no
			ASCII codes, the driver will translate these keys as needed to
			handle the extended keys. <br/>
<br/>
Here is a list of the octal
			codes used in the keymaps tables: </font></font></font><font color="#000000"><font size="3" style="font-size: 12pt"><br/>
</font></font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt"><br/>
Scan
			- ASCII - Octal<br/>
code - code – &nbsp;code<br/>
2A –
			l.SHIFT - 0200<br/>
</font></font></font><font face="Courier New, monospace">2B
			- '\' <br/>
2C - 'z' <br/>
...<br/>
35 - '/' <br/>
36 – r.SHIFT</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace"> 0201<br/>
37
			- '*' <br/>
38 - ALT</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0203
			<br/>
39 - ' ' <br/>
3A - CapsLock</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">0204<br/>
3B
			- F1</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0241<br/>
3C
			- F2</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0242<br/>
3D
			- F3</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0243<br/>
3E
			- F4</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0244<br/>
3F
			- F5</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0245<br/>
40
			- F6</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0246
			<br/>
41 - F7</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0247
			<br/>
42 - F8</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0250
			<br/>
43 - F9</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0251
			<br/>
44 - F10</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0252
			<br/>
45 - NumLock</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace"> 0205
			<br/>
46 - ScrLock</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace"> 0210
			<br/>
47 - Home</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0267<br/>
48
			- CurUp</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0270<br/>
49
			- PgUp</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0271<br/>
4A
			- '-'</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0211<br/>
4B
			- Left</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0264<br/>
4C
			- MID</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0265<br/>
4D
			- Right</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0266<br/>
4E
			- '+'</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0214<br/>
4F
			- End</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0261<br/>
50
			- Down</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0262<br/>
51
			- PgDown</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;</font></font></font><font face="Courier New, monospace">0263<br/>
52
			- Insert</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;</font></font></font><font face="Courier New, monospace">0272<br/>
53
			- Delete</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;</font></font></font><font face="Courier New, monospace">0177<br/>
54
			- Enter <br/>
<br/>
Shifted keys<br/>
40 - F6</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0226
			<br/>
41 - F7</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0227
			<br/>
42 - F8</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0230
			<br/>
43 - F9</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0231
			<br/>
44 - F10</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font><font face="Courier New, monospace">0232
			<br/>
45 - NumLock</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace"> 0204
			<br/>
46 - ScrLock</font><font color="#000000"><font face="Courier New, monospace"><font size="3" style="font-size: 12pt">
			-</font></font></font><font face="Courier New, monospace">
			0213<br/>
<br/>
</font><font face="Arial, sans-serif">Each of the
			keyboard tables defines up to 89 scancode entries. Most keyboards
			do not feature more keys.<br/>
<br/>
If “ANSI console terminal
			emulation“ has been selected in “make menuconfig“, the
			keyboard driver will translate the HOME, END, INSERT, PageUP and
			PageDown keys to ANSI terminal sequences. <br/>
Thus the HOME key
			is defined in the keymap table with the octal code of 267 which is
			0xb7 in hex. The driver will then send “ESC[H“ to the
			application for the code 0xb7. <br/>
<br/>
6th of July 2020 Georg
			Potthast</font></p>
		</td>
	</tr>
</table>
<p style="margin-bottom: 0cm"><br/>

</p>
</body>
</html>